﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage/CommonPage.master" AutoEventWireup="true" CodeFile="EditActivity.aspx.cs" Inherits="Activity_EditActivity" ValidateRequest="false" EnableEventValidation="true"%>
<%@ Register TagPrefix="editor" Assembly="WYSIWYGEditor" namespace="InnovaStudio" %>
<%@ Register Assembly="Expo.Training.BRule" Namespace="Expo.Training.BRule.Controls" TagPrefix="CC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pagenav"><b>您现在的位置：</b>我的管理平台 > <strong><a href="ActivityManagement.aspx">活动信息管理</a></strong> > 修改活动信息</div>
<div style="overflow:auto;">
    <!--paneltitle-->
    <div class="paneltitle">活动信息</div>
    <!--paneladd-->
    <div class="paneladd">
         <input type="button" class="btn" value="返回" onclick="javascript:window.location.href = 'ActivityManagement.aspx';this.blur();return false;" />
    </div>
</div>

<div  class="dataform">
	<table cellspacing="1" class="editortable">
	    <tr>
        	<td colspan="2" style="vertical-align:middle; font-weight:bold; padding-left:10px;" class="base">登录资料：（<font color="red">*</font>表示必填项）</td>
        </tr>
	    <tr>
        	<th width="20%"><div><font color="red">*</font>活动名称：</div></th>
            <td class="editortd" width="80%">
    	        <asp:TextBox ID="txtTitle" runat="server" CssClass="txtBox" MaxLength="50" Width="150px" />
    	        <span id="valTitle" style="display:none;" class="note2"><img src="<%=ResolveThemeImagePath("iconinfo.gif")%>" align="absmiddle" /></span><span class="note2 msgError"></span>
            </td>
        </tr>        
	    <tr>
        	<th width="20%"><div><font color="red">*</font>活动简介：</div></th>
            <td class="editortd" style="width: 80%; height: 300px;">
    	        <CC:CecEditor4 runat="server" ID="txtIntro" AllowFileManager="true" EditorWidth="590" EditorHeight="260" ResizeType="1" ScriptFile="../kindeditor4/kindeditor.js" UploadHandle="../KindEditor4/upload_json.ashx" FileManageHandle="../KindEditor4/file_manager_json.ashx" ResizeMode="1"></CC:CecEditor4>
    	        <span id="valIntro" style="display:none;" class="note2"><img src="<%=ResolveThemeImagePath("iconinfo.gif")%>" align="absmiddle" /></span><span id="introError" class="note2 msgError"></span>
            </td>
        </tr>
        <tr>
        	<th><div><font color="red">*</font>意向地点：</div></th>
            <td>
    	        <asp:TextBox ID="txtDestination"  runat="server" CssClass="txtBox" MaxLength="50" Width="200px" />
    	        <span id="valDestination" style="display:none;" class="note2"><img src="<%=ResolveThemeImagePath("iconinfo.gif")%>" align="absmiddle" /></span><span class="note2 msgError"></span>
            </td>
        </tr>
        <tr>
        	<th><div><font color="red">*</font>人数：</div></th>
            <td>
    	        <asp:TextBox ID="txtCount"  runat="server" CssClass="txtBox" MaxLength="50" Width="50px" />
    	        <span style="color:#999999">必须填写数字</span>
    	        <span id="valCount" style="display:none;" class="note2"><img src="<%=ResolveThemeImagePath("iconinfo.gif")%>" align="absmiddle" /></span><span class="note2 msgError"></span>
            </td>
        </tr>
	    
        <tr class="editortr">
        	<th class="editorth"><div></div></th>
            <td class="editortd">
                <asp:Button ID="btn_Edit" runat="server" Text="修 改" CssClass="btn" OnClick="btn_Edit_Click" OnClientClick="check()" />
            </td>
        </tr>
	</table>
</div>
<script type="text/javascript">
    function check() {
        var _actTitle, _actCount;
        var _errorCount = 0;
        _actTitle = jQuery.trim(jQuery("#<%= txtTitle.ClientID %>").val());
        _actDestination = jQuery.trim(jQuery("#<%= txtDestination.ClientID %>").val());
        _actCount = jQuery.trim(jQuery("#<%= txtCount.ClientID %>").val());

        jQuery(".msgError").empty();
        jQuery(".note2").hide();

        if (_actTitle == "") {
            _errorCount += 1;
            jQuery("#valTitle").show().next().show().html("必须填写活动名称");
        }

        if (_actDestination == "") {
            _errorCount += 1;
            jQuery("#valDestination").show().next().show().html("必须填写意向地点");
        }

        if (_actCount == "") {
            _errorCount += 1;
            jQuery("#valCount").show().next().show().html("必须填写人数");
        } else {
            var reg = /^\+?[1-9][0-9]*$/; //判断是否为正整数正则
            if (!reg.test(_actCount)) {
                _errorCount += 1;
                jQuery("#valCount").show().next().show().html("必须填写一个正整数");
            }
        }

        if (_errorCount != 0) {
            return false;
        } else {
            return true;
        }
    }
</script>
</asp:Content>

